import logging, yagmail
from BeautifulReport import BeautifulReport


class tool() :
    def log(self) :
        log = logging.basicConfig(level=logging.DEBUG,
                                  format='%(levelname)s->%(filename)s->%(asctime)s->%(lineno)d',
                                  filename='aaa.log',
                                  filemode='a+')
        return log

    def send_email(self, filename) :
        send = yagmail.SMTP(user='3177622011@qq.com', password='xjwzrxaryqjydece', host='smtp.qq.com')
        send.send(to='3177622011@qq.com', subject='AAA报告', attachments=filename, contents='大大大大')
        send.close()

    def baogao(self,suite):
        BeautifulReport(suite).report(filename='AAA.html',description='单纯的粪污哦')